<template>
  <div class="school">
    <h2>学校名字: {{ name }}</h2>
    <h2>学生地址: {{ address }}</h2>
    <button @click="showMsg">点我</button>
  </div>
</template>

<script>
export default {
  name: "School",
  data() {
    return {
        name: '尚硅谷',
        address: '宏福苑',
        msg: '培训机构'
    };
  },
  methods: {
      showMsg(){
          alert(`${this.name}的性质是${this.msg}`)
      }
  }
};
</script>

<style>
.school{
    background-color: chocolate;
}
</style>